//
//  TitleView.m
//  B段项目
//
//  Created by 昶博 on 15/9/24.
//  Copyright (c) 2015年 昶博. All rights reserved.
//

#import "TitleView.h"
#import <AFNetworking.h>
#import <UIImageView+WebCache.h>
#import "PrefixHeader.pch"
@implementation TitleView
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
 self.titleImageView = [[UIImageView alloc]init];
        
    [self addSubview:self.titleImageView];
       
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.font = [UIFont boldSystemFontOfSize:19*w];
        [self addSubview:self.titleLabel];
        self.DetaileLabel  = [[UILabel alloc]init];
        self.DetaileLabel.numberOfLines = 0;
        self.DetaileLabel.font = [UIFont systemFontOfSize:15*w];
        [self addSubview:self.DetaileLabel];
        
    
      }
    return self;
    
}
-(void)layoutSubviews
{
   
  
    [super layoutSubviews];
    self.titleImageView.frame = CGRectMake(20*w, 20*h, 130*w, 130*h);
    self.titleImageView.layer.masksToBounds = YES;
    self.titleImageView.layer.cornerRadius = 65*h;
    self.titleLabel.frame = CGRectMake(210*w, 20*h, 150*w, 30*h);
    self.DetaileLabel.frame = CGRectMake(170*w, 45*h, 200*w, 120*h);
 
    [self.titleImageView sd_setImageWithURL:[NSURL URLWithString:self.model.album_imgurl ] placeholderImage:[UIImage imageNamed:@"44.jpg"]];
    
    self.titleLabel.text = self.model.album_name;
    self.DetaileLabel.text = self.model.album_descrition;
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
